package com.zy.composeworld.ui.screens.image.image

import android.util.Log
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.basicMarquee
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredSize
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.text.ClickableText
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.foundation.text.selection.DisableSelection
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Add
import androidx.compose.material.icons.rounded.AddCircle
import androidx.compose.material.icons.rounded.Menu
import androidx.compose.material.icons.rounded.ShoppingCart
import androidx.compose.material3.Icon
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.Shadow
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.imageResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.ParagraphStyle
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.input.KeyboardCapitalization
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import coil.compose.AsyncImage
import com.zy.composeworld.R


@OptIn(ExperimentalFoundationApi::class)
@Preview
@Composable
fun IconTestPager001() {



    LazyColumn(
        modifier = Modifier
            .padding(16.dp)
            .background(color = Color.Gray),
        verticalArrangement = Arrangement.spacedBy(16.dp),
    ) {


        item {
            TextHead("Icon painterResource")

            Icon(
                painter = painterResource(R.drawable.ic_like_selected),
                contentDescription = ""
            )
            Icon(
                painter = painterResource(R.drawable.ic_like_selected),
                tint = Color.Red,
                contentDescription = ""
            )

            Icon(
                painter = painterResource(R.drawable.ic_like_selected),
                tint = Color.Blue,
                contentDescription = ""
            )
            Icon(
                painter = painterResource(R.drawable.ic_like_selected),
                tint = Color.Green,
                contentDescription = ""
            )
        }

        item {


            TextHead("Icons.Filled")
            LazyRow {
                itemsIndexed(listFilled) { index, item ->
                    Icon(
                        item,
                        contentDescription = ""
                    )

                }
            }

            TextHead("Icons.Outlined")
            LazyRow {
                itemsIndexed(listOutlined) { index, item ->
                    Icon(
                        item,
                        contentDescription = ""
                    )

                }
            }

            TextHead("Icons.Rounded")
            LazyRow {
                itemsIndexed(listRounded) { index, item ->
                    Icon(
                        item,
                        contentDescription = ""
                    )

                }
            }

            TextHead("Icons.TwoTone")
            LazyRow {
                itemsIndexed(listTwoTone) { index, item ->
                    Icon(
                        item,
                        contentDescription = ""
                    )

                }
            }

            TextHead("Icons.Sharp")
            LazyRow {
                itemsIndexed(listSharp) { index, item ->
                    Icon(
                        item,
                        contentDescription = ""
                    )

                }
            }
        }


    }

}


@Composable
private fun TextHead(text: String) {
    Text(text, fontWeight = FontWeight.Bold, color = Color.Red)
}